<?php

namespace App\Entities;

use Illuminate\Database\Eloquent\Model;

class CartItemModel extends Model
{
    protected $table = 'cart_items';

    protected $fillable = [
        'user_id',
        'product_sku_id',
        'assign_date',
        'assign_time',
    ];

    public $timestamps = false;

    public function user()
    {
        return $this->belongsTo(UserModel::class);
    }

    public function productSku()
    {
        return $this->belongsTo(ProductSkuModel::class);
    }

    public function product()
    {
        return $this->belongsTo(ProductModel::class);
    }
}
